import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Route, Router, IndexRoute, browserHistory } from 'react-router';

//Actions
import * as counterAction from 'root_path/actions/counter.js';

//UI components
import App from 'root_path/pages/layout/AppLayoutView.jsx';
import Home from 'root_path/pages/home/Content.jsx';
import IndexPage from 'root_path/pages/index/Index.jsx';
import Counter from 'root_path/pages/counter/Content.jsx';
import Auther from 'root_path/pages/auther/Content.jsx';
import Fetch from 'root_path/pages/fetch/Content.jsx';

import Shop from 'root_path/pages/shop/Shop.jsx';

//Url
import { url } from 'root_path/util/url.js';

// Map Redux state to component props
function mapStateToProps(state){
  return {
    value: state.count
  };
}

// Map Redux actions to component props
function mapDispatchToProps(dispatch) {
  return {
  	actions: bindActionCreators(counterAction, dispatch)
  };
}

// Connected Component:
var counter = connect(mapStateToProps, mapDispatchToProps)(Counter);

export default (
	<Router history={browserHistory}>
			<Route path="/" component={IndexPage}/>
			<Route path={url.shop} component={Shop}/>
		{/*<Route path="/" component={App}>
			 <Route path={url.auther} component={Auther}/>
			<Route path={url.home} component={Home}/>
			<Route path={url.counter} component={counter}/>
			<Route path={url.fetch} component={Fetch}/> 
		</Route>*/}
	</Router>
);


